module.exports = function(grunt) {
    // Project configuration.
    var filesList = [
    ];
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        uglify: {
            options: {
                banner: '/*!<%=pkg.name%>-<%=pkg.version%>.js <%=grunt.template.today("yyyy-mm-dd") %>*/\n'
            },
            build: {
                files: {
                    'build/<%=pkg.name%>-<%=pkg.version%>.min.js': filesList
                }
            }
        },
        jshint: {
            build: filesList,
            options: {
                jshintrc: '.jshintrc'
            }
        },
        jsdoc: {
            build: {
                src: ['js/**.js'],
                options: {
                    "encoding": "utf8",
                    "recurse": true,
                    "readme": "README.md",
                    "access": "all",
                    "template": "node_modules/minami"
                },
                dest: 'docs'
            }
        },
        watch: {
            build: {
                files: ['src/*.js'],
                tasks: ['jshint'],
                options: {
                    spawn: false
                }
            }
        }
    });
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-jsdoc');
    grunt.registerTask('default', ['jshint','uglify','jsdoc','watch']);
    // grunt.registerTask('default', ['jshint']);
};
